package main

import (
	_ "easyblog/routers"
	_ "easyblog/utils/db"
	_ "easyblog/utils/es"
	_ "easyblog/utils/log"
	"easyblog/utils/filter"
	beego "github.com/beego/beego/v2/server/web"
)

func main() {
	beego.InsertFilter("*", beego.BeforeRouter, filter.CorsFilter)
	beego.InsertFilter("/admin/*", beego.BeforeRouter, filter.LoginFilter)

	beego.Run()
}
